{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="form1" action="" method="post">	
                <div class="box-header with-border">
                    <span class="fa fa-edit (alias)" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">考试名称设置</p>
                </div>
                <div class="box-body">
                    <p class="text-info" style="font-size:16px; line-height:26px; margin-bottom:20px;">说明：此页面用于设置年级通用考试，大考一般包括期中考、期末考、模拟考、毕业会考，其他并非重要的考试不要归类到大考中。系统中已有期中考、期末考。并配置给所有班级，无需再次设置。此页面的考试名称请认真核对，设置后不要随意更改，以免影响成绩历年比较；某个考试名称已经有成绩数据时，不能删除；新学期会自动延续上学期的考试名称及设置。</p>
                    
                     <div class="form-group">
						  <label class="col-md-2 control-label text-right">
							   学年学期：
						  </label>
						  <div class="input-group col-md-3 col-sm-12 col-xs-12">
							    <select class="form-control" name="semester_id">
                                {%foreach from=$semester_lists key=key item=value%}
                                     <option value="{%$value.semester_id%}">{%$value.semester_name%}</option>
                                {%/foreach%}
                                </select>
						  </div> 
				     </div> 
                     <div class="form-group">
						  <label class="col-md-2 control-label text-right">
							   考试名称全称：
						  </label>
						  <div class="col-md-3 col-sm-12 col-xs-12" style="padding:0;">
							   <input type="text" class="form-control" name="exam_name"  value="">
						  </div>
                           <label class="col-md-1 control-label text-right">
							   简称：
						  </label>
						  <div class="input-group col-md-1 col-sm-12 col-xs-12">
							   <input type="text" class="form-control" name="exam_ename" value="">
						  </div> 
                          <p class="col-md-offset-2">全称用于报表，简称用于下拉菜单，最多三个汉字。</p>
				     </div> 
                     <div class="form-group">
						  <label class="col-md-2 control-label text-right">
							   分类：
						  </label>
						  <div class="input-group col-md-10 col-sm-12 col-xs-12">
								{%foreach from=$exam_type_ini key=key item=value%}
							    <label class="choice"><input type="radio" name="exam_type" value="{%$key%}"{%if $key==1%}checked="checked"{%/if%} > {%$value%}</label>
								{%/foreach%}
						  </div> 
				     </div> 
                     <div class="form-group">
						  <label class="col-md-2 control-label text-right">
							   成绩形式：
						  </label>
						  <div class="input-group col-md-10 col-sm-12 col-xs-12">
								{%foreach from=$score_type_ini key=key item=value%}
							    <label class="choice"><input type="radio" name="score_type" value="{%$key%}" > {%$value%}</label>
								{%/foreach%}
						  </div> 
				     </div> 
                     <div class="form-group">
						  <label class="col-md-2 control-label text-right">
							   适用于：
						  </label>
						  <div class="input-group col-md-10 col-sm-12 col-xs-12"  id = "awardall-frame-down">
                                <label class="choice"><input type="checkbox" name="allChecked" id="allChecked" onclick="DoCheck()" checked="checked" />全选/取消</label>
								{%foreach from=$grade_lists key=key item=value%}
							    <label class="choice"><input type="checkbox" name="grade_ids[]" value="{%$value.grade_id%}" checked="checked"> {%$value.grade_name%}</label>
								{%/foreach%}
						  </div> 
				     </div> 
				</div><!--box-body -->
                <div class="box-footer text-center">
                    <button type="submit" class="btn btn-primary ">  确 定</button>
                </div>
              </form>
           </div><!--box box-default box-solid-->
         </section>   
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
<script>
function DoCheck()
	{
		var ch=document.getElementsByName("grade_ids[]");
		if(document.getElementsByName("allChecked")[0].checked==true)
	   {
			for(var i=0;i<ch.length;i++)
			{
			ch[i].checked=true;
			}
		}else{
			for(var i=0;i<ch.length;i++)
			{
			ch[i].checked=false;
			}
		}
	}
</script>

